package com.itheima.advice;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

//增强类   通知类
@Component
@Aspect
public class Myadvice {
    public void yqr(){
        System.out.println("这是一个有钱人");
    }
    public void qr(){
        System.out.println("这是一个穷逼");
    }

    @Around("execution(* com.itheima.service.*.*.*(..)))")
    public void around(ProceedingJoinPoint pjp) throws Throwable {
        System.out.println("傻狗");
        Object[] args = pjp.getArgs();
        pjp.proceed(args);

    }
}
